export type ArticleStatus = 0 | 1; // 0: draft, 1: published

export interface BaseArticle {
  title: string;
  content: string;
  coverImage?: string;
  summary?: string;
  author: string;
  status: ArticleStatus;
}

export interface Article extends BaseArticle {
  id: string;
  createTime: string;
  updateTime: string;
}

export type CreateArticleDTO = Omit<BaseArticle, 'author'>;

export type UpdateArticleDTO = Partial<BaseArticle>;

export interface ArticleListItem {
  id: string;
  title: string;
  summary?: string;
  coverImage?: string;
  createTime: string;
  author: string;
  status: ArticleStatus;
}

export interface UploadResponse {
  url: string;
  [key: string]: any;
}